# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -x mir < %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 -O1 -run-pass=livevars,twoaddressinstruction | FileCheck %s

---
name: PR58914
tracksRegLiveness: true
stack:
  - { id: 0, offset: 0, size: 768 }
body:             |
  ; CHECK-LABEL: name: PR58914
  ; CHECK: bb.0:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
  ; CHECK-NEXT:   liveins: $rcx, $ymm0
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gr64_nosp = COPY killed $rcx
  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:vr256x = COPY killed $ymm0
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:vk16wm = COPY $rsp
  ; CHECK-NEXT:   [[VBLENDMPDZ256rmk:%[0-9]+]]:vr256x = VBLENDMPDZ256rmk killed [[COPY2]], [[COPY1]], %stack.0, 8, [[COPY]], 0, $noreg
  ; CHECK-NEXT:   RET killed [[VBLENDMPDZ256rmk]]
  bb.0:
    successors: %bb.1(0x7c000000)
    liveins: $rcx, $ymm0
    %0:gr64_nosp = COPY $rcx
    %1:vr256x = COPY $ymm0

  bb.1:
    successors: %bb.1(0x7c000000)
    %2:vk16wm = COPY $rsp
    %3:vr256x = VMOVUPDZ256rmk %1, killed %2, %stack.0, 8, %0, 0, $noreg
    RET %3

...
